<!DOCTYPE html>
<html>
<head>
    <title>模型管理页面</title>
</head>
<link href="/static/css/controls.css" rel="stylesheet" type="text/css">
<script>var ctx = '';
var basePath = '/grule-manager';</script>

<script src="/bower_components/requirejs/require.js" data-main="/static/app.js" data-bootstrap-modules="'system/model/BusinessModelModule'"></script>
<body ng-controller="BusinessModelController" ng-cloak>

模型名称：<input type="text" ng-model="search.name">

<button ng-click="searchBusinessModel()">查询</button>
<button ng-click="showAddBusinessModel()">新增</button>
<g-data-source url="/grule-manager/businessModel" data-source-name="businessModelSource" page="true" allow-auto-load="true"></g-data-source>

<br>
<br>
<br>
<hr>
<div ng-show="showPage">
    <g-data-grid data-source-name="businessModelSource"
                 data-on-load-success="businessModelRendered(grid)"
                 data-checked-rows="sysCheckedRows"
                 on-select="selectRow(record)"
                 g-height="300"
                 ng-cloak>
        <g-column width="20%" data="name" >模型名称</g-column>
        <g-column width="200" data="remark" >备注</g-column>
        <g-column width="200px">
            <i class="fi fi-set"></i>&nbsp;操作
            <g-column-tmpl>
                <g-action-remove on-before-action="onRemoveRecord($event, record)"></g-action-remove>
                <a href="javascript:" ng-click="grid.actions.edit(row)">编辑</a>
                <a href="/html/model/businessModelAttributeManager#/?businessModelId={{row.id}}" >模型属性编辑</a>
            </g-column-tmpl>
        </g-column>
    </g-data-grid>
    <g-pagination-navi source-name="businessModelSource"></g-pagination-navi>
    <g-pagination-size source-name="businessModelSource"></g-pagination-size>
</div>
</div>

<div ng-show="showAdd">
    <textarea ng-model="addBusinessModel" rows="30" cols="100">
    </textarea>
    <button ng-click="createBusinessModel()">保存</button>
    <button ng-click="showPageView()">返回</button>
</div>

<div ng-show="showEdit">
    id: <input readonly="readonly" ng-model="currId"><br>
    <textarea ng-model="editBusinessModel" rows="30" cols="100" >
    </textarea>
    <button ng-click="updateBusinessModel()">保存</button>
    <button ng-click="showPageView()">返回</button>
</div>

</body>
</html>
